/*
 * JawBreakerFrame.java
 *
 * Created on 8 February 2007, 22:28
 */

package jx.swing.board.app;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import jx.swing.board.event.DefaultGameController;

/**
 *
 * @author  Yuezhong, Zhang
 */
public class JawBreakerFrame extends javax.swing.JFrame {
    
    /** Creates new form JawBreakerFrame */
    public JawBreakerFrame() {
        initComponents();
       controller = new  DefaultGameController();
       controller.setBoard(board1);
       controlPanel1.setController(controller);
       setTitle("JawBreaker V1.2");
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        controlPanel1 = new jx.swing.board.ControlPanel();
        board1 = new jx.swing.board.Board();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().add(controlPanel1, java.awt.BorderLayout.LINE_START);

        javax.swing.GroupLayout board1Layout = new javax.swing.GroupLayout(board1);
        board1.setLayout(board1Layout);
        board1Layout.setHorizontalGroup(
            board1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 322, Short.MAX_VALUE)
        );
        board1Layout.setVerticalGroup(
            board1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 332, Short.MAX_VALUE)
        );

        getContentPane().add(board1, java.awt.BorderLayout.CENTER);

        jLabel1.setText("Developed by : Yuezhong Zhang");
        getContentPane().add(jLabel1, java.awt.BorderLayout.PAGE_END);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (Exception ex) {
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (ClassNotFoundException ex1) {
                Logger.getLogger(JawBreakerFrame.class.getName()).log(Level.SEVERE, null, ex1);
            } catch (InstantiationException ex1) {
                Logger.getLogger(JawBreakerFrame.class.getName()).log(Level.SEVERE, null, ex1);
            } catch (IllegalAccessException ex1) {
                Logger.getLogger(JawBreakerFrame.class.getName()).log(Level.SEVERE, null, ex1);
            } catch (UnsupportedLookAndFeelException ex1) {
                Logger.getLogger(JawBreakerFrame.class.getName()).log(Level.SEVERE, null, ex1);
            }
        } 
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JawBreakerFrame().setVisible(true);
            }
        });
    }
    DefaultGameController controller;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private jx.swing.board.Board board1;
    private jx.swing.board.ControlPanel controlPanel1;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
    
}
